/*
*
* DModeManager
*
* Creates and stores DMode objects and current dMode
*
*/
class DModeManager{
  
  // --------------------------------------------------
  // attributes
  // --------------------------------------------------
  ArrayList dModes;
  int dMode;
  
  // --------------------------------------------------
  // constructor
  // --------------------------------------------------
  DModeManager(NHood[] hoods) {
    
    dMode = 0;                   // set drawing mode to "default" value
    dModes = new ArrayList();
    
    // create drawing modes
    
    // STARTUP DISPLAY
    
    // neighbourhoods
    dModes.add(new DMode("Neighbourhoods", hoods, ColourTable.BLACK, "", false));
    
    // AGE
    
    // average age
    dModes.add(new DMode("Average age", hoods, ColourTable.RD_BU, "aveAge", true));
    
    // INCOME
    
    // average income
    dModes.add(new DMode("Average income", hoods, ColourTable.PI_Y_G, "aveIncome", true));
    // median income
    dModes.add(new DMode("Median income", hoods, ColourTable.PI_Y_G, "medianIncome", true));
    // income per square meter
    // TO IMPLEMENT
    
    // DENSITY
    
    // people per dwelling
    dModes.add(new DMode("People per dwelling", hoods, ColourTable.OR_RD, "peoplePerDwelling", true));
    // population density
    dModes.add(new DMode("Population density (persons/km2)", hoods, ColourTable.OR_RD, "popDensity", true));
    // dwelling unit density
    // TO IMPLEMENT
    // income density
    dModes.add(new DMode("Income density (000 $/km2)", hoods, ColourTable.OR_RD, "incomeDensity", true));
    
    // OWNER STATUS
    
    // percent renters
    dModes.add(new DMode("Percent renters", hoods, ColourTable.PU_BU, "percentRent", true));
    // percent owners
    dModes.add(new DMode("Percent owners", hoods, ColourTable.PU_BU, "percentOwn", true));
    
    // STRUCTURE TYPE
    
    // percent single detached
    dModes.add(new DMode("Percent single detached", hoods, ColourTable.REDS, "percentRent", true));
    // percent duplex/rowhouse
    dModes.add(new DMode("Percent duplex/rowhouse", hoods, ColourTable.REDS, "percentDuplexRowHouse", true));
    // apartments greater than or equal to 5 stories
    dModes.add(new DMode("Percent apartments >= 5 stories", hoods, ColourTable.REDS, "percentApt5Plus", true));
    // apartments less than 5 stories
    dModes.add(new DMode("Percent aparments < 5 stories", hoods, ColourTable.REDS, "percentAptLess5", true));
    
    // LOT STATUS
    
    // percent occupied
    dModes.add(new DMode("Percent occupied", hoods, ColourTable.PU_OR, "percentOccupied", true));
    // percent unoccupied
    dModes.add(new DMode("Percent unoccupied", hoods, ColourTable.PU_OR, "percentUnoccupied", true));
    // percent under construction
    dModes.add(new DMode("Percent under construction", hoods, ColourTable.PU_OR, "percentUnderConstruction", true));
    // percent under construction
    dModes.add(new DMode("Percent no longer in use", hoods, ColourTable.PU_OR, "percentNoLongerInUse", true));
    // percent no longer in use 
    dModes.add(new DMode("Percent vacant lots", hoods, ColourTable.PU_OR, "percentVacantLot", true));
    
    
  } // constructor
  
  // --------------------------------------------------
  // setDMode
  // --------------------------------------------------
  void setDMode(int i) {
    
    dMode = i;
    
  } // setDMode
  
  // --------------------------------------------------
  // getDMode
  // --------------------------------------------------
  DMode getDMode() {
    
    return (DMode) dModes.get(dMode);
    
  } // getDMode
  
  
} // DModeManager
